package com.sso.client.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: TongRui乀
 * @Date: 2020-03-24 9:37
 * @description：
 */
@RestController
@RequestMapping("user")
public class UserController {

    @GetMapping("list")
    public List<Map<String,String>> list(){

        ArrayList<Map<String, String>> maps = new ArrayList<>();

        HashMap<String, String> user1 = new HashMap<>();

        user1.put("id","1");
        user1.put("name","jack");
        user1.put("age","10");

        HashMap<String, String> user2 = new HashMap<>();

        user2.put("id","2");
        user2.put("name","rose");
        user2.put("age","20");

        HashMap<String, String> user3 = new HashMap<>();

        user3.put("id","3");
        user3.put("name","lee");
        user3.put("age","30");

        maps.add(user1);
        maps.add(user2);
        maps.add(user3);

        return maps;
    }

}